import { defineConfig } from 'vitepress';

export default defineConfig({
  title: 'Snoby Utils',
  description: 'A javascript utils.',
  base: '/',

  themeConfig: {
    nav: [
      { text: '首页', link: '/' },
      { text: 'API', link: '/api/' },
    ],

    sidebar: [
      {
        text: 'API 文档',
        items: [
          { text: '介绍', link: '/api/' },
          { text: '全局', link: '/api/globals' },
          {
            text: '类型判断',
            items: [
              { text: 'is', link: '/api/functions/is' },
              { text: 'isString', link: '/api/functions/isString' },
              { text: 'isNumber', link: '/api/functions/isNumber' },
              { text: 'isArray', link: '/api/functions/isArray' },
              { text: 'isObject', link: '/api/functions/isObject' },
              { text: 'isFunction', link: '/api/functions/isFunction' },
              { text: 'isNull', link: '/api/functions/isNull' },
              { text: 'isUndefined', link: '/api/functions/isUndefined' },
              { text: 'isBoolean', link: '/api/functions/isBoolean' },
              { text: 'isDate', link: '/api/functions/isDate' },
              { text: 'isElement', link: '/api/functions/isElement' },
              { text: 'isWindow', link: '/api/functions/isWindow' },
              { text: 'isClient', link: '/api/functions/isClient' },
              { text: 'isPromise', link: '/api/functions/isPromise' },
              { text: 'isAsyncFunction', link: '/api/functions/isAsyncFunction' },
              { text: 'isDef', link: '/api/functions/isDef' },
              { text: 'isUnDef', link: '/api/functions/isUnDef' },
              { text: 'isNullOrUnDef', link: '/api/functions/isNullOrUnDef' },
              { text: 'is0000', link: '/api/functions/is0000' },
              { text: 'is2400', link: '/api/functions/is2400' },
              { text: 'isHexColor', link: '/api/functions/isHexColor' },
            ],
          },
          {
            text: '数据处理',
            items: [
              { text: 'findItemByTreeList', link: '/api/functions/findItemByTreeList' },
              { text: 'filterDataByFilterDate', link: '/api/functions/filterDataByFilterDate' },
              { text: 'transformKeysAndMerge', link: '/api/functions/transformKeysAndMerge' },
              { text: 'objectKeys', link: '/api/functions/objectKeys' },
              { text: 'objectValues', link: '/api/functions/objectValues' },
              { text: 'createNameSpace', link: '/api/functions/createNameSpace' },
              { text: 'getFlatMenuList', link: '/api/functions/getFlatMenuList' },
            ],
          },
          {
            text: '时间工具',
            items: [
              { text: 'calcDurationDate', link: '/api/functions/calcDurationDate' },
              { text: 'dayDifference', link: '/api/functions/dayDifference' },
              { text: 'generateHourOptions', link: '/api/functions/generateHourOptions' },
              {
                text: 'generateTimeOptionsWithStep',
                link: '/api/functions/generateTimeOptionsWithStep',
              },
              {
                text: 'mapToNearest15MinInterval',
                link: '/api/functions/mapToNearest15MinInterval',
              },
              { text: 'timeRangeForm24Hour', link: '/api/functions/timeRangeForm24Hour' },
              {
                text: 'formatMinutesToHoursMinutes',
                link: '/api/functions/formatMinutesToHoursMinutes',
              },
              { text: 'minutesToDHCompact', link: '/api/functions/minutesToDHCompact' },
            ],
          },
          {
            text: '文件处理',
            items: [
              { text: 'Base64toFile', link: '/api/functions/Base64toFile' },
              { text: 'binaryToBlob', link: '/api/functions/binaryToBlob' },
              { text: 'blobToFile', link: '/api/functions/blobToFile' },
              {
                text: 'findFileNameByContentDisposition',
                link: '/api/functions/findFileNameByContentDisposition',
              },
              { text: 'nativeDownload', link: '/api/functions/nativeDownload' },
              { text: 'webDownload', link: '/api/functions/webDownload' },
            ],
          },
          {
            text: '网络工具',
            items: [{ text: 'getParam', link: '/api/functions/getParam' }],
          },
        ],
      },
    ],

    socialLinks: [{ icon: 'gitee', link: 'https://gitee.com/sno-master/snoby-utils.git' }],

    search: {
      provider: 'local',
    },
  },
});
